# ###############################################
# Set the compiler SSE options from the selections.
# Detect MSVC or Intel compilers.
IF( COMPILER_MSVC OR COMPILER_INTEL )
	IF( SIMD_SSE_AVX )
		SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /arch:AVX" )
		SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:AVX" )

	ELSEIF( SIMD_SSE_4 OR SIMD_SSE3_1 OR SIMD_SSE_3 OR SIMD_SSE_2 )
		SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /arch:SSE2" )
		SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:SSE2" )

	ELSEIF( SIMD__SSE )
		SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /arch:SSE" )
		SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:SSE" )

	ELSE()
		SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /arch:IA32" )
		SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:IA32" )
	ENDIF()

	IF( MSVC_IDE )
		SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries )
		SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries )
		SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries )

		ADD_DEFINITIONS( -D_VARIADIC_MAX=10 )
	ENDIF()

ENDIF()

